<style media="screen">
#todoIndex .page-title{
  font-size: 16px;
  font-weight: 500;
  color:#666;
  line-height: 56px;
  margin: 0 24px;
  border-bottom: 1px solid #E3E3E5;
}
.head-container{
  padding: 10px 0 14px;
  margin: 0 24px 21px;
  border-bottom: 1px solid #E3E3E5;
}
.head-container .mes{
  overflow: hidden;
  margin-right: 10px;
  float: left;
}
.head-container .mes p{
  font-size: 12px;
  color:#CFCFCF;
  margin-bottom: 6px;
}
.head-container .mes input{
  width: 220px;
  height: 34px;
}
.head-container .flow{
  float: left;
  margin-right: 10px;
}
.head-container .flow p{
  font-size: 12px;
  color:#CFCFCF;
  margin-bottom: 6px;
}
.head-container .flow .flow-select{
  width: 140px;
  height: 34px;
}
.head-container .button-group{
  padding-top: 23px;
}
</style>

<section id="todoIndex">
  <p class="page-title">待办事项列表</p>
  <div class="head-container clearfix relative">
    <div class="mes">
      <p>信息检索</p>
      <div class="global_search">
        <span class="icon-Gm-search"></span>
        <input
          type="text"
          class="global_ipt_text"
          placeholder="发起人/关联单据/客户名称"
          v-model="info"
         />
      </div>
    </div>
    <div class="flow" v-if="!showView">
      <p>流程名称</p>
      <hl-select :data="todoState" v-model="selectedData" width="140" @on-change="checkBpm"></hl-select>
    </div>
    <div class="flow" v-if="showView">
      <p class="color-cfcfcf">项目</p>
			<hl-select :data="projectList" v-model="projectId" width="140" @on-change="getprojectId"></hl-select>
    </div>
    <div class="flow" v-if="showView">
      <p class="color-cfcfcf">楼宇</p>
			<hl-select :data="buildingList" v-model="buildingId" width="140" @on-change="getbuildingId"></hl-select>
    </div>
    <div class="flow" v-if="showView">
      <p class="color-cfcfcf">楼层</p>
			<hl-select :data="floorList" v-model="floorId" width="140" @on-change="getfloorId"></hl-select>
    </div>
    <div class="flow" v-if="showView" style="margin-right: 24px;">
      <p class="color-cfcfcf">单元</p>
			<hl-select :data="unitList" v-model="unitId" width="140" @on-change="getunitId"></hl-select>
    </div>
    <div class="flow" :class="{'mt-10': showView}" v-if="showView">
      <p>流程名称</p>
			<hl-select :data="todoState" v-model="selectedData" width="140" @on-change="checkBpm"></hl-select>
    </div>
    <div class="button-group pull-left" :class="{'mt-10': showView}">
      <button class="btn s-btn-default mr-10" @click="getData(1, selectedData[0])">查询</button>
      <button class="btn s-btn-default" @click="reset">重置</button>
    </div>
    <div class="global_open_sign" @click="openSearch">
      <span class="icon-turn-right global_open_icon" style="transform:translate(-5px,0px) rotate(90deg);" v-if="!showView"></span>
      <span v-if="!showView">展开</span>
      <span class="icon-turn-right global_open_icon" style="transform:translate(-5px,0px) rotate(-90deg);" v-if="showView"></span>
      <span v-if="showView">收起</span>
    </div>
  </div>

  <div class="todo-content global_table" style="border:1px solid #E5E5E5;">
    <div class="todo-content-head global_table_title">
      <div class="dy-fx-1">序号</div>
      <div class="dy-fx-3">流程编号</div>
      <div class="dy-fx-2">流程名称</div>
      <div class="dy-fx-3">关联单据</div>
      <div class="dy-fx-3">客户名称</div>
      <div class="dy-fx-2">发起人</div>
      <div class="dy-fx-3">发起时间</div>
      <div class="dy-fx-3">分配给我的时间</div>
      <div class="dy-fx-2">当前节点</div>
      <div class="dy-fx-1 border-l">操作</div>
    </div>
    <div class="todo-content-list global_table_item" v-for="(item, index) in data">
      <div class="dy-fx-1">{{index+1 | tozero}}</div>
      <div class="dy-fx-3 ellipsis-1" :title="item.bmpNo">{{item.bmpNo}}</div>
      <div class="dy-fx-2 ellipsis-1" :title="item.bpmName">{{item.bpmName}}</div>
      <div class="dy-fx-3 ellipsis-1">{{item.businessNo || '--'}}</div>
      <div class="dy-fx-3 ellipsis-1">{{item.customerName || '--'}}</div>
      <div class="dy-fx-2 ellipsis-1">{{item.starterName}}</div>
      <div class="dy-fx-3 ellipsis-1">{{item.bpmTime | timeFilter}}</div>
      <div class="dy-fx-3 ellipsis-1">{{item.taskTime | timeFilter}}</div>
      <div class="dy-fx-2 ellipsis-1">{{item.taskName ? item.taskName : '--'}}</div>
      <div class="dy-fx-1 border-l">
        <a v-if="item.bpmKey == 'IT'" @click="goToITFLow(item.taskId,item.bpmId,item.bpmKey,item.businessId)" href="javascript:;">处理</a>
        <a v-if="item.bpmKey == 'CT'" @click="goToContractFLow(item.taskId,item.bpmId,item.bpmKey,item.businessId)" href="javascript:;">处理</a>
        <a v-if="item.bpmKey == 'WT'" @click="goToWithdrawFlow(item.taskId,item.bpmId,item.bpmKey,item.businessId)" href="javascript:;">处理</a>
        <a v-if="item.bpmKey == 'RRAT'" @click="rratFlowPage(item.taskId,item.bpmId,item.bpmKey,item.businessId)" href="javascript:;">处理</a>
        <a v-if="item.bpmKey == 'CCT'" @click="cctFlowPage(item.taskId,item.bpmId,item.bpmKey,item.businessId)" href="javascript:;">处理</a>
        <a v-if="item.bpmKey == 'BT'" @click="btFlowPage(item.taskId,item.bpmId,item.bpmKey,item.businessId)" href="javascript:;">处理</a>
      </div>
    </div>
  </div>

  <div class="user-page pl-24 pr-24 ptb-10 clearfix">
    <div class="pull-left">
      <span class="font-14 user-page-num ">共<i>{{pageNum.totalCount}}</i>条记录</span>
      <span>
        每页
				<div class="inline">
					<hl-select :data="pageNums" v-model="limit" width="80" @on-change="getDateTime"></hl-select>
				</div>
        条
      </span>
  </div>
  <div class="pull-right">
    <ul class="page" id="page"></ul>
  </div>
  </div>
</section>
<script src="modules/workbench/scripts/todo.js" charset="utf-8"></script>
